﻿//
// GNS_UserTopUp.h
// MobileManageSys
//FuncTion 个人充值/兑奖查询
// Created by mr.l on 16/1/14.
//
//

#ifndef __MobileManageSys__GNS_UserTopUp__
#define __MobileManageSys__GNS_UserTopUp__

#include "cocos2d.h"
#include "cocostudio/CocoStudio.h"
#include "ui/CocosGUI.h"
#include "GNS_Calendar.h"
#include "GNS_UserTopUpDea.h"
#include "GNS_MakeLayer.h"
#include "GNS_Common.h"
USING_NS_CC;
using namespace cocostudio::timeline;
using namespace ui;

class GNS_UserTopUp : public Layer
{
public:
    GNS_UserTopUp();
    ~GNS_UserTopUp();
    static GNS_UserTopUp* createLayer();
    virtual bool init();
    CREATE_FUNC(GNS_UserTopUp);
    void BtnCallBack(Ref *pSender , ui::Widget::TouchEventType type);
    //void SelectedItemEvents(Ref*pSender,ui::ListView::EventType type);
    void TimeButtonCallBack(Ref * pSender , ui::Widget::TouchEventType type);
    void ListViewBtn(Ref * pSender ,ui::Widget::TouchEventType type);
    void SetNodeName(std::string CsbName);
    void GetFailDate(std::string Date);
    void SendDate();
    void RemoveItem();
private:
    void ReadCsv();
    int TypeConversion(std::string type);
    void AddListViewDate();
    Text * TestText=nullptr;
    static GNS_UserTopUp* pSony;
private:
    Node * pGNS_UserTopUp;
    Text * TimeText;
    Text * TypeText;
    int year;
    ListView * pListView;
    ImageView * ImageeViewType;
    std::vector<std::string > _DateStr;
    map<int,vector<CMD_SC_GetUserExchangeInfoResult> >_UserTopUp;
    vector<CMD_SC_GetUserExchangeInfoResult>m_UserTopUp;
    ListView*pTypeList;
    GNS_Calendar * pCalendar;
    GNS_MakeLayer * pMakeLayer;
    std::string GetTypeStr(int TypeNum);
    int MagID=0;
    int FaillMsgID=0;
    int _selType = 0;
public:
    Button * pNewManage;
    PopWndLayer * pManPopWnd;
    GNS_UserTopUpDea * pUserTopUpDea;
    void CloserMakeLayer();
};

#endif /* defined(__MobileManageSys__GNS_UserTopUp__) */